﻿using CrawlerApp.Core.Entities.BookAggregate;
using HtmlAgilityPack;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Threading.Tasks;

namespace CrawlerApp.Services.Interfaces
{
    public interface IHtmlPraseService
    {
        Task<string> GetTextAsync(string url, string xPath);
        Task<string> GetHrefAsync(string url, string xPath);
        Task<Book> GetBookAsync(string url);
        Task<IReadOnlyCollection<T>> GetSpecifyCollectionAsync<T>(string url, string xPath, Expression<Func<HtmlNode, T>> selector, Expression<Func<HtmlNode, bool>> predicate = null);
    }
}
